<?php


namespace Tbf\Bundle\TestBundle\Logger;


use Psr\Log\AbstractLogger;

class ArrayLogger extends AbstractLogger{
    protected $log_data = array();
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed $level
     * @param string $message
     * @param array $context
     * @return null
     */
    public function log($level, $message, array $context = array())
    {
        $this->log_data[] = array(
            'level'=>$level,
            'message'=>$message,
            'context'=>$context,
        );
    }
    public function clearLogData(){
        $this->log_data = array();
    }
    public function getLogData(){
        return $this->log_data;
    }
    public function countLogData(){
        return count($this->log_data);
    }
}